<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'top.jsp' starting page</title>
  </head>
  <body>
	<h2 align="center">通讯录管理系统</h2>
	
	<table align="center" width="100%" >
		<tr>
			<td>
				<a href="<c:url value='/page/contactmanager.jsp'/>" target="right">联系人管理</a>
				<a href="<c:url value='/page/groupmanager.jsp'/>" target="right" >分组管理</a>
				<a href="<c:url value='/page/updatepassword.jsp'/>" target="right">修改密码</a>
			</td>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
			<td>
				<form action="<c:url value='/servlet/SearchServlet'/>" target="right" method="post">
				<input type="text" name="key"/>&nbsp;&nbsp;
				<input type="submit" name="submit" value="搜索"/>
				</form>
			</td>
			<td>
				<c:if test="${user!=null}">
				欢迎您：${user.username }  <a href="<c:url value='/servlet/LogoutServlet'/>" target="_top">注销</a>
				</c:if>
				<c:if test="${user==null}">
					<a href="<c:url value='/jsps/login.jsp'/>" target="_top">登录</a>
					<a href="<c:url value='/jsps/register.jsp'/>" target="_top">注册</a>
				</c:if>
			</td>
		</tr>
	</table>
  </body>
</html>
